import React, { Component } from 'react'
import './index.css'
import xianxia from '../../assets/images/xianxia.png'
import { withRouter } from 'react-router-dom'
class Boy extends Component {
    render() {
        const { man } = this.props
        return (
            <div className="boy-container">
                <div className="sex">
                    <div>男生小说</div>
                    <div className="man-icon">
                        <i className="iconfont iconnansheng"></i>
                    </div>
                    <div></div>
                </div>
                <div className="list">
                    <ul className="list-content">
                        {
                            man.map((item) =>{
                                return (
                                    <li  key={item.id} onClick={this.goBookClass(item.id)}>
                                        <div className="book-pic">
                                            <p>{item.name}</p>
                                            <p>
                                                <img src={xianxia}  alt="" />
                                            </p>
                                        </div>
                                        <div className="book-sum">{item.count}本书籍</div>
                                    </li>
                                )
                            })
                        }

                       
                    </ul>
                </div>
            </div>
        )
    }

    goBookClass = (id) =>{
       return () =>{
            this.props.history.push('/bookcalss',{id:id})
       }
    }

    
}
export default withRouter(Boy)
